#pragma once
#include "GlobalAI.h" // Insert your AI file Here.
#pragma warning(disable: 4244 4018) // signed/unsigned and loss of precision...
class mozg;
class TTAICore;
class UnitTable;
class skupienie
{
	vector<float3>punkty;
	vector<int> punktyL;
	float srednica;
	TTAICore *G;
public:
	skupienie(float3 p1, float3 p2, TTAICore * g,int nr1, int nr2);
	void dodaj(float3 pkt,int nr);
	void aktualizuj();
	bool czyMasz (int pkt);

};

class MetalMap
{
public:
	mozg * M;
	MetalMap(IAICallback* ai);
	virtual ~MetalMap();

	void init();

	int NumSpotsFound;
	int AverageMetal;
	vector<float3> VectoredSpots;
	vector<float3> punktyNaBazy;

	vector<float3> liczPunktyNaBazy ();
	TTAICore * G;
	IAICallback * cb;

private:
	void GetMetalPoints();
	void SaveMetalMap();
	bool LoadMetalMap();
	vector<int> LastTryAtSpot;
	float3 BufferSpot;
	bool Stopme;
	int MaxSpots;
	int MetalMapHeight;
	int MetalMapWidth;
	int TotalCells;
	int SquareRadius;
	int DoubleSquareRadius;
	int TotalMetal;
	int MaxMetal;
	int TempMetal;
	int coordx;
	int coordy;
	int MinMetalForSpot;
	unsigned char XtractorRadius;
	unsigned char DoubleRadius;
	unsigned char* MexArrayA;
	unsigned char* MexArrayB;
	unsigned char* MexArrayC;
	int* TempAverage;
	IGlobalAI *ai;
};
